from lib.common import capture_error


class CodecProtobuf(object):
    codec_type = "protobuf"

    @staticmethod
    @capture_error
    def decode(msg):
        return

    @staticmethod
    def encode():
        return

    @staticmethod
    def parse_body(data):
        data = {
            "a": data.a,
            "p": data.p,
            "d": data.d,
            "rid": data.client_rid,
        }

        return data

    @staticmethod
    def fmt_response(result, err):
        return result


codecProtobuf = CodecProtobuf()
